package com.karal.javase.cher03;

/**
 * @TODO
 * @Author xu
 * 2025/3/6
 */
public class Test2 {
    public static void main(String[] args) {
        // 创建一个普通员工对象
        Employee employee = new Employee("张三", "北京市", "E001", 5000, 3);
        System.out.println("涨工资前: " + employee);
        employee.increaseSalary(); // 给员工涨工资
        System.out.println("涨工资后: " + employee);

        // 创建一个经理对象
        Manager manager = new Manager("李四", "上海市", "M001", 10000, 5, "中层");
        System.out.println("涨工资前: " + manager);
        manager.increaseSalary(); // 给经理涨工资
        System.out.println("涨工资后: " + manager);
    }
}
